package com.jspgou.cms.action.front;

import static com.jspgou.cms.Constants.MEMBER_SYS;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.jspgou.common.web.springmvc.MessageResolver;
import com.jspgou.core.entity.Website;
import com.jspgou.cms.web.ShopFrontHelper;
import com.jspgou.cms.web.SiteUtils;


@Controller
public class PaymentAct {

	@RequestMapping(value = "/pay1.jspx", method = RequestMethod.GET)
	public String pay1(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.payOnline"), request);
	}
	@RequestMapping(value = "/pay2.jspx", method = RequestMethod.GET)
	public String pay2(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.payOnGoods"), request);
		
	}
	
	@RequestMapping(value = "/inland.jspx", method = RequestMethod.GET)
	public String inland(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.inland"), request);
	}
	
	@RequestMapping(value = "/returnGoods.jspx", method = RequestMethod.GET)
	public String returnGoods(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.returnGoods"), request);
	}
	
	@RequestMapping(value = "/privacy.jspx", method = RequestMethod.GET)
	public String privacy(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.privacy"), request);
	}
	
	@RequestMapping(value = "/gsjj.jspx", method = RequestMethod.GET)
	public String gsjj(HttpServletRequest request, ModelMap model) {
		Website web = SiteUtils.getWeb(request);
		ShopFrontHelper.setCommonData(request, model, web);
		return web.getTplSys(MEMBER_SYS, MessageResolver.getMessage(request,
				"tpl.gsjj"), request);
	}
}
